<?php	
	if($this->menu_id) { $menu_db_class = new Menu_Model_DbTable_Menu(); $menu_name = $menu_db_class->getMenuName($this->menu_id); $this->headTitle()->headTitle($menu_name,'SET'); }else{ $this->headTitle()->headTitle($this->translator->translator('page_title'),'SET'); }
	if($this->translator->translator('search_meta_key')) { $this->headMeta()->setName('keywords',$this->translator->translator('search_meta_key')); }
	if($this->translator->translator('search_meta_desc')) { $this->headMeta()->setName('description',$this->translator->translator('search_meta_desc'));	 }
?>

<div class="mod">
    <div class="search-icon">
        <h1><?php if($this->escape($this->menu_id)){ echo $this->escape($this->menu_id); }else{ echo $this->translator->translator('page_title'); }; ?></h1>
    </div>
	<div class="clear">&nbsp;</div>

    <div id="box_div_3" class="mod-container simple-container">
    <form id="form1" name="form1" method="post" action="<?php echo $this->url(array('module' => 'Search','controller' => 'search','action' => 'list'),'Search',true); ?>">
        <input type="text" name="search_field" id="search_field" class="search_field_cs big-field" value="<?php echo $this->escape($this->search_data); ?>" />
        <input type="submit" name="Submit" value="<?php echo $this->translator->translator('partial_search_btn'); ?>" class=""/>
    </form>
    </div>

	<?php
    if($this->hits)
    {
    ?> 		 
        
        <?php
            $i = 0;
            foreach($this->hits as $hit)
            {
        ?>
            <div class="mod-container">
                <?php if($hit->doc_image){ ?>
                <img src="<?php echo $hit->doc_image_path.'/'.$hit->doc_image; ?>" height="60" border="0" class="thumb"/>
                <div class="mod-title"><a href="<?php echo $this->url(array('module' => 'Search','controller' =>'search', 'action' => 'details', 'doc_table' => $this->escape($hit->doc_table) ,'doc_title' => strip_tags($this->escape($hit->doc_title)), 'doc_search' => $this->escape($this->search_data) ),'Search-Details/:doc_table/:doc_title/:doc_search'); ?>"  title="<?php echo strip_tags($this->escape($hit->doc_title)); ?>" hit="<?php echo $hit->id; ?>" ><?php echo $hit->doc_name; ?></a></div>
                <?php } echo $this->viewHelper->truncate(strip_tags($hit->simple_text, '<b>'),300); ?></b>
            </div>
        <?php
                $i++;
            }
        ?>
        
    <?php
        if($i == 0)
        {				
            echo $this->translator->translator('search_result_not_found');			
        }
    }
    else
    {
        echo  $this->err_msg;
    }
    ?>

    <div class="clear">
    <?php
        if($this->hits)
        {
            echo $this->paginationControl($this->hits, 'Sliding', 'search/pagination-flickr.phtml');
        } 	 
    ?>
    </div>
</div>